var ns,  app;
app = new Vue({
    el: '#app',
    data: {
        list:[]

    },
    methods: {
        getData:function(){
            var that=this;
            ns.post({
                action: 'getmytopprojectlist'
            }, function (succeed, data, err) {
                if (succeed) {
                    that.list = data.list;
                } else {
                    api.toast({
                        msg: err,
                        duration: 2000,
                        location: 'bottom'
                    });
                }
            })
        

        },
        do_choosexiaoqu:function(item){
            var that=this;
            api.sendEvent({
                name: 'selected_xiaoqu',
                extra: {
                    xiaoquid:item.ID,
                 xiaoquname:item.Name
                }
            });
            setTimeout(function () {
                api.closeWin();
            }, 500)
        }


    }
});
apiready = function() {
    api.parseTapmode();
    ns = window.Foresight.Util;
    app.getData();
};
